<?php
require "../common.php";
if ($_POST) {
    $title = $_POST['title'];
    $content = $_POST['content'];
    $time = time();
    mysql_query("insert into `article` (`title`, `content`, `time`) 
    values ('$title', '$content', '$time')");
    echo "<script>alert('恭喜您，发布成功！');location.href='article.php';</script>";
}
require "templates/add.html";